﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Details.aspx.vb" Inherits="HatHotels.Details" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 95%;
        }
        .style2
        {
            width: 243px;
        }
        .style3
        {
            width: 243px;
            text-align: right;
        }
        .style4
        {
            width: 243px;
            text-align: left;
        }
        .style5
        {
            width: 100%;
        }
        .style6
        {
            width: 442px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />
        <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" DataKeyNames="ID" DataSourceID="SqlDataSource1" 
            ForeColor="#333333" GridLines="None" AutoGenerateRows="False" Width="100%">
            <AlternatingRowStyle BackColor="White" />
            <CommandRowStyle BackColor="#D1DDF1" Font-Bold="True" />
            <EditRowStyle BackColor="#2461BF" />
            <FieldHeaderStyle BackColor="#DEE8F5" Font-Bold="True" />
                <fields>
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="Details.aspx?ID={0}" DataTextField="HotelName" 
                    HeaderText="Hotel Name" />
                <asp:BoundField DataField="Location" HeaderText="Location" 
                    SortExpression="Location" />

                 <asp:TemplateField HeaderText="stars">
                <ItemTemplate><h1><%# getstar(Eval("stars"))%></h1> </ItemTemplate>
                
                                   
                
                
                </asp:TemplateField>

                <asp:HyperLinkField DataNavigateUrlFields="PostCode" 
                    DataNavigateUrlFormatString="Http://maps.google.co.uk/?q={0}" 
                    DataTextField="PostCode" HeaderText="PostCode" Text="PostCode" />
                <asp:ImageField DataImageUrlField="Picture" HeaderText="Picture" 
                        DataImageUrlFormatString="image/{0}">
                    <ControlStyle Height="400px" Width="600px" />
                    <HeaderStyle Height="200px" Width="200px" />
                </asp:ImageField>
                <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
            </fields>
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
        </asp:DetailsView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HatConnStr %>" 
            ProviderName="<%$ ConnectionStrings:HatConnStr.ProviderName %>" 
            SelectCommand="SELECT * FROM [HotelMainTable] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p>
        <asp:GridView ID="GridView1" runat="server" Width="907px" 
            AutoGenerateColumns="False" DataSourceID="SqlDataSource2" CellPadding="4" 
            ForeColor="#333333" GridLines="None" style="text-align: center">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="Author" HeaderText="Author" 
                    SortExpression="Author" />
                <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                <asp:BoundField DataField="Comment" HeaderText="Comment" 
                    SortExpression="Comment" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HatConnStr %>" 
            ProviderName="<%$ ConnectionStrings:HatConnStr.ProviderName %>" 
            
            SelectCommand="SELECT [Title], [Author], [Comment] FROM [Comments] WHERE ([HotelID_FK] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="HotelID_FK" QueryStringField="ID" 
                    Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <table class="style5">
        <tr>
            <td class="style6">
                <asp:Chart ID="Chart2" runat="server" DataSourceID="SqlDataSource5">
                    <series>
                        <asp:Series ChartType="Pie" Name="Series1" XValueMember="HotelName" 
                            YValueMembers="SumOfHotel_fkID">
                        </asp:Series>
                    </series>
                    <chartareas>
                        <asp:ChartArea Name="ChartArea1">
                        </asp:ChartArea>
                    </chartareas>
                </asp:Chart>
                <asp:SqlDataSource ID="SqlDataSource5" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:HatConnStr %>" 
                    ProviderName="<%$ ConnectionStrings:HatConnStr.ProviderName %>" 
                    SelectCommand="SELECT [HotelName], [SumOfHotel_fkID] FROM [Hotel_like_byvisitors]">
                </asp:SqlDataSource>
            </td>
            <td>
                <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:HatConnStr %>" 
                    ProviderName="<%$ ConnectionStrings:HatConnStr.ProviderName %>" 
                    SelectCommand="SELECT [HotelName], [CountOfTravellerName] FROM [Query_sum]">
                </asp:SqlDataSource>
                <asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource4">
                    <series>
                        <asp:Series Name="Series1" XValueMember="HotelName" 
                            YValueMembers="CountOfTravellerName">
                        </asp:Series>
                    </series>
                    <chartareas>
                        <asp:ChartArea Name="ChartArea1">
                        </asp:ChartArea>
                    </chartareas>
                </asp:Chart>
            </td>
        </tr>
        <tr>
            <td class="style6">
                <p>
&nbsp;most Liked hotels :</p>
            </td>
            <td>
                <p>
                    most viewed hotels:</p>
            </td>
        </tr>
    </table>
    <table class="style1">
        <tr>
            <td class="style2">
                <asp:Button ID="Btn_like" runat="server" style="margin-top: 0px" Text="Like" 
                    Width="99px" />
                <asp:Image ID="img_Like" runat="server" ImageUrl="~/image/like.png" 
                    Visible="False" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
    <asp:Rating  BorderWidth="1" BorderStyle="Solid"
    width="200" 
    Height="40" 
    ID="Rating1"  
    CurrentRating="2" 
    runat="server" 
    StarCssClass="ratingStar" 
    WaitingStarCssClass="savedRatingStar" 
    EmptyStarCssClass="emptyRatingStar" 
    filledStarCssClass="filledRatingStar"
    MaxRating="5" style="margin-top: 1px" 
    >


    </asp:Rating>
            </td>
            <td>
                <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                </asp:ToolkitScriptManager>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Button ID="Button3" runat="server" Text="Save Rating" />
                </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                <strong>Add your&nbsp; new comment here </strong>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style3">
                <strong>Title&nbsp;&nbsp;
        </strong>
            </td>
            <td>
        <asp:TextBox ID="tb_Title" runat="server" Width="653px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style3">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style3">
                <strong>comment</strong></td>
            <td>
                <asp:TextBox ID="tb_Comment" runat="server" Width="649px" 
        Height="76px" TextMode="MultiLine"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style3">
                &nbsp;</td>
            <td>
    <asp:Button ID="Button1" runat="server" Text="Add your comment" Height="51px" 
                    Width="660px" />
            </td>
        </tr>
        <tr>
            <td class="style3">
                &nbsp;</td>
            <td>
        <asp:CheckBoxList ID="CheckBoxList1" runat="server" 
            DataSourceID="SqlDataSource3" DataTextField="Tag" DataValueField="ID" 
            RepeatDirection="Horizontal">
        </asp:CheckBoxList>
            </td>
        </tr>
        <tr>
            <td class="style4">
                <span style="font-size: small; font-weight: 700">&nbsp;New Tag Here separate by commas</span></td>
            <td>
                <asp:TextBox ID="TextBox1" runat="server" 
            Width="659px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style4">
                &nbsp;</td>
            <td>
        <asp:Button ID="Button2" runat="server" Text="Tag This Hotel" Height="36px" />
            </td>
        </tr>
    </table>
    <br />
    <p>
        &nbsp;<asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HatConnStr %>" 
            ProviderName="<%$ ConnectionStrings:HatConnStr.ProviderName %>" 
            SelectCommand="SELECT [ID], [Tag] FROM [Tags]"></asp:SqlDataSource>
    </p>
    <p>
        </p>
    <p>
        &nbsp;</p>
</asp:Content>
